package com.opoc.Exception;

import com.opoc.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

  @ExceptionHandler(Exception.class)
  public Result ExceptionHandler(Exception ex){
    ex.printStackTrace();
    return Result.error("请求失败");
  }
}
